package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.ItemInfoMapper;
import com.whq.entity.ItemInfo;
import com.whq.service.ItemInfoService;

@Service(value = "tdItemInfoService")
public class ItemInfoServiceImpl implements ItemInfoService {

    @Autowired
    private ItemInfoMapper<ItemInfo>tdItemInfoMapper;
    
    @Override
    public Integer insertSelective(ItemInfo tdItemInfo) throws Exception {
           return this.tdItemInfoMapper.insertSelective(tdItemInfo);
        }

    @Override
    public Integer insertBatch(List<ItemInfo> tdItemInfo) throws Exception {
           return this.tdItemInfoMapper.insertBatch(tdItemInfo) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdItemInfoMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdItemInfoMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(ItemInfo tdItemInfo) {
           return this.tdItemInfoMapper.updateByPrimaryKeySelective(tdItemInfo);
    }

    @Override
    public ItemInfo findById(Object id) {
           return (ItemInfo) this.tdItemInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<ItemInfo> selectByCondition(ItemInfo tdItemInfo) {
           return (List<ItemInfo>) this.tdItemInfoMapper.selectByCondition(tdItemInfo);
    }

    @Override
    public Integer selectCountByCondition(ItemInfo tdItemInfo) {
           return  this.tdItemInfoMapper.selectCountByCondition(tdItemInfo);
    }

}
